<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/18
 * Time: 15:46
 */

namespace addons\admin\service;


class Admin
{
    static function list_($param=[],$cond=[])
    {
        if (isset($param["search_"]) && !empty($param["search_"])) {   #搜索条件
            $cond["user_name|telephone"] = ["LIKE", "%" . $param["search_"] . "%"];
        }
        $c = new \app\common\model\Admin();
        $r_data = $c
            ->field("shop_users.*")
            ->where($cond)
            ->join("shop_users","shop_users.id = shop_admin.user_id")
            ->paginate(30,false,['query'=>request()->param()]);
        return $r_data;
    }
}